package com.kobeliu.api.fallback;

import com.kobeliu.api.feign.UsersMicroServiceFeign;
import com.kobeliu.pojo.Users;
import com.kobeliu.pojo.bo.SearchBO;
import com.kobeliu.result.GraceJSONResult;
import org.springframework.stereotype.Component;

@Component
public class UsersMicroServiceFeignFallback implements UsersMicroServiceFeign {
    @Override
    public Long getCountByCompanyId(String companyId) {
        return null;
    }

    @Override
    public GraceJSONResult bindingHRToCompany(String userId, String realName, String companyId) {
        return null;
    }

    @Override
    public GraceJSONResult getInfo(String userId) {
        //对应feign方法的兜底方法
        //返回一个空user对象
        Users users = new Users();
        users.setId(userId);
        return GraceJSONResult.ok(users);
    }

    @Override
    public GraceJSONResult changUser2Hr(String hrUserId) {
        return null;
    }

    @Override
    public GraceJSONResult getUserInfos(SearchBO searchBO) {
        return null;
    }
}
